﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="InformationSystem.WebSite.Login" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户登录</title>
</head>

<body style="background-image:url(img/LoginBack.png);background-repeat:no-repeat;background-position:center top">
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />

    <ext:Window runat="server" Closable="false" Resizable="false" Height="150" Icon="Lock"
        Title="登陆" Draggable="false" Width="350" Padding="5" Layout="FormLayout">     

        <Items>
            <ext:TextField runat="server" ID="txtUsername" FieldLabel="用户名" AllowBlank="false"
                BlankText="用户名必须填写" AnchorHorizontal="100%">
            </ext:TextField>
            <ext:TextField runat="server" ID="txtPassword" FieldLabel="密码" InputType="Password"
                AllowBlank="false" BlankText="密码必须填写" AnchorHorizontal="100%">
            </ext:TextField>
        </Items>
        <Buttons>
            <ext:Button ID="btnLogin" runat="server" Text="登陆" Icon="Accept">
                <Listeners>
                    <Click Handler="
                            if (!#{txtUsername}.validate() || !#{txtPassword}.validate()) {
                                Ext.Msg.alert('错误','用户名和密码都必须填写!');
                                // return false to prevent the btnLogin_Click Ajax Click event from firing.
                                return false; 
                            }" />
                </Listeners>
                <DirectEvents>
                    <Click OnEvent="btnLogin_Click">
                        <EventMask ShowMask="true" Msg="正在验证..." MinDelay="500" />
                    </Click>
                </DirectEvents>
            </ext:Button>
        </Buttons>
    </ext:Window>
    </form>
</body>
</html>
